class Book < ActiveRecord::Base  
  acts_as_versioned
  has_and_belongs_to_many :categories


  validates_presence_of :author, :title, :isbn
  def to_s
    return title
  end
  
  def to_param 
    "#{id}-#{permalink}"
  end
end